package ua.kpi.flats.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.security.core.GrantedAuthority;

@Entity
@Table(name = "AUTHORITY")
public class Authority implements GrantedAuthority, Serializable {
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "AUTHORITYID")
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long authorityId;
	
	@Column(name = "AUTHORITY")
	private String authority;	
	
	public Authority(){		
	}
	
	public String getAuthority() {
		return authority;
	}
	public void setAuthority(String authority) {
		this.authority = authority;
	}
	public long getAuthorityId() {
		return authorityId;
	}
	public void setAuthorityId(long authorityId) {
		this.authorityId = authorityId;
	}
}
